﻿<Window x:Class="ImageTagEditor.MainWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:custom="clr-namespace:ImageTagEditor"
		xmlns:converter="clr-namespace:ImageTagEditor.ValueConverters"
		Title="Image Tag Editor" 
		x:Name="mainWindow"
		MouseWheel="mainWindow_MouseWheel"
		Closing="mainWindow_Closing"
		PreviewKeyDown="mainWindow_PreviewKeyDown" 
		DragEnter="mainWindow_DragEnter" 
		DragLeave="mainWindow_DragLeave" 
		Drop="mainWindow_Drop"
		AllowDrop="True" 
		Icon="/ImageTagEditor;component/Images/imageTagEditorIcon.ico">
	
	<Window.Resources>
		<TextBlock x:Key="issueLink">
				<custom:BrowserLink NavigateUri="http://bitmaptagger.codeplex.com/WorkItem/List.aspx">http://bitmaptagger.codeplex.com/WorkItem/List.aspx</custom:BrowserLink>
		</TextBlock>
		
	</Window.Resources>
	
    <Grid x:Name="grid">
		<Grid.RowDefinitions>
			<RowDefinition Height="auto" />
			<RowDefinition Height="*" />
			<RowDefinition Height="42" />
		</Grid.RowDefinitions>
		<Menu Grid.Row="0">
			<MenuItem Header="_File">
				
				<MenuItem Header="_Open Image"
						  x:Name="openImageMenuItem"
						  Click="openImageMenuItem_Click">
					<MenuItem.ToolTip>
						<custom:PowerToolTip Header="Open Image"
										 Error=""
										 MaxWidth="{StaticResource toolTipMaxWidth}"
										 ShortcutVisiblity="Visible"
										 Shortcut="Ctrl + O">
							<custom:PowerToolTip.Description>
								<StackPanel>
									<TextBlock TextWrapping="WrapWithOverflow">
									Open a new image.
									</TextBlock>
								</StackPanel>
							</custom:PowerToolTip.Description>
						</custom:PowerToolTip>
					</MenuItem.ToolTip>
					
				</MenuItem>
				<MenuItem Header="Open _Folder of Images"
						  x:Name="openImageDirectoryMenuItem"
						  Click="openImageDirectoryMenuItem_Click">
					<MenuItem.ToolTip>
						<custom:PowerToolTip Header="Open Folder of Images"
										 Error=""
										 MaxWidth="{StaticResource toolTipMaxWidth}"
										 ShortcutVisiblity="Visible"
										 Shortcut="Ctrl + F">
							<custom:PowerToolTip.Description>
								<StackPanel>
									<TextBlock TextWrapping="WrapWithOverflow">
									Open all the image contained in a folder.
									</TextBlock>
								</StackPanel>
							</custom:PowerToolTip.Description>
						</custom:PowerToolTip>
					</MenuItem.ToolTip>
				</MenuItem>
				
				<Separator />
				
				<MenuItem Header="_Save Image"
						  x:Name="saveImageMenuItem"
						  Click="saveImageMenuItem_Click">
					<MenuItem.ToolTip>
						<custom:PowerToolTip Header="Save Image"
										 Error=""
										 MaxWidth="{StaticResource toolTipMaxWidth}"
										 ShortcutVisiblity="Visible"
										 Shortcut="Ctrl + S">
							<custom:PowerToolTip.Description>
								<StackPanel>
									<TextBlock TextWrapping="WrapWithOverflow">
									Save the image currently being viewed.
									</TextBlock>
								</StackPanel>
							</custom:PowerToolTip.Description>
						</custom:PowerToolTip>
					</MenuItem.ToolTip>
				</MenuItem>
				<MenuItem Header="Save Image _As" 
						  x:Name="saveImageAsMenuItem"
						  Click="saveImageAsMenuItem_Click">
					<MenuItem.ToolTip>
						<custom:PowerToolTip Header="Save Image As"
										 Error=""
										 MaxWidth="{StaticResource toolTipMaxWidth}"
										 ShortcutVisiblity="Visible"
										 Shortcut="Ctrl + Alt + S">
							<custom:PowerToolTip.Description>
								<StackPanel>
									<TextBlock TextWrapping="WrapWithOverflow">
									Save the image currently being viewed to a new location.
									</TextBlock>
								</StackPanel>
							</custom:PowerToolTip.Description>
						</custom:PowerToolTip>
					</MenuItem.ToolTip>
				</MenuItem>
				<MenuItem Header="Save All _Images"
						  x:Name="saveAllImageMenuItem"
						  Click="saveAllImageMenuItem_Click">
					<MenuItem.ToolTip>
						<custom:PowerToolTip Header="Save All Images"
										 Error=""
										 MaxWidth="{StaticResource toolTipMaxWidth}"
										 ShortcutVisiblity="Visible"
										 Shortcut="Ctrl + Shift + S">
							<custom:PowerToolTip.Description>
								<StackPanel>
									<TextBlock TextWrapping="WrapWithOverflow">
									Save all the opened images.
									</TextBlock>
								</StackPanel>
							</custom:PowerToolTip.Description>
						</custom:PowerToolTip>
					</MenuItem.ToolTip>
				</MenuItem>
				
				<Separator />
				
				<MenuItem Header="Close Current Image"
						  x:Name="closeCurrentImageMenutItem"
						  Click="closeCurrentImageMenutItem_Click">
					<MenuItem.ToolTip>
						<custom:PowerToolTip Header="Close Image"
										 Error=""
										 MaxWidth="{StaticResource toolTipMaxWidth}"
										 ShortcutVisiblity="Visible"
										 Shortcut="Ctrl + W">
							<custom:PowerToolTip.Description>
								<StackPanel>
									<TextBlock TextWrapping="WrapWithOverflow">
									Close the image currently being viewed.
									</TextBlock>
								</StackPanel>
							</custom:PowerToolTip.Description>
						</custom:PowerToolTip>
					</MenuItem.ToolTip>
				</MenuItem>
				<MenuItem Header="_Exit" 
						  x:Name="exitMenuItem"
						  Click="exitMenuItem_Click">
					<MenuItem.ToolTip>
						<custom:PowerToolTip Header="Exit"
										 Error=""
										 MaxWidth="{StaticResource toolTipMaxWidth}"
										 ShortcutVisiblity="Visible"
										 Shortcut="Alt + F4">
							<custom:PowerToolTip.Description>
								<StackPanel>
									<TextBlock TextWrapping="WrapWithOverflow">
									Close the application.
									</TextBlock>
								</StackPanel>
							</custom:PowerToolTip.Description>
						</custom:PowerToolTip>
					</MenuItem.ToolTip>
				</MenuItem>
			</MenuItem>
			
			<MenuItem Header="Options"
					  x:Name="optionsMenuItem"
					  Click="optionsMenuItem_Click" />  
		</Menu>
		
		<custom:ImageTagView x:Name="imageTagView"
							 Grid.Row="1" />
		
		<Grid Grid.Row="2"
			  Margin="0,2,0,0"
			  x:Name="imageCollectionControlGrid">
			<Grid.RowDefinitions>
				<RowDefinition Height="*" />
				<RowDefinition Height="auto" />
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="28" />
				<ColumnDefinition Width="5" />
				<ColumnDefinition Width="28" />
				<ColumnDefinition Width="5" />
				<ColumnDefinition Width="28" />
				<ColumnDefinition Width="*" />
			</Grid.ColumnDefinitions>

			

			<Button x:Name="backButton"
					Click="backButton_Click"
					Grid.Row="0"
					Grid.Column="1"
					HorizontalAlignment="Center">
				<Button.ToolTip>
					<custom:PowerToolTip Header="Back"
										 Error=""
										 MaxWidth="{StaticResource toolTipMaxWidth}"
										 ShortcutVisiblity="Visible"
										 Shortcut="Ctrl + Left Arrow">
						<custom:PowerToolTip.Description>
							<StackPanel>
								<TextBlock TextWrapping="WrapWithOverflow">
										Show the previous image in the open images.
								</TextBlock>
							</StackPanel>
						</custom:PowerToolTip.Description>
					</custom:PowerToolTip>
				</Button.ToolTip>
				<Image Source="/ImageTagEditor;component/Images/backArrow.png" />
			</Button>
		
			<Button x:Name="saveButton"
					Click="saveButton_Click"
					Grid.Row="0"
					Grid.Column="3"
					HorizontalAlignment="Center">
				<Image Source="/ImageTagEditor;component/Images/save.png" />
				<Button.ToolTip>
					<custom:PowerToolTip Header="Save"
										 Error=""
										 MaxWidth="{StaticResource toolTipMaxWidth}"
										 ShortcutVisiblity="Visible"
										 Shortcut="Ctrl + S">
						<custom:PowerToolTip.Description>
							<StackPanel>
								<TextBlock TextWrapping="WrapWithOverflow">
									The image with the current tag values.
								</TextBlock>
								<TextBlock TextWrapping="WrapWithOverflow">
									Hold Ctrl to perform a "Save As".
								</TextBlock>
							</StackPanel>
						</custom:PowerToolTip.Description>
					</custom:PowerToolTip>
				</Button.ToolTip>
			</Button>
		
			<Button x:Name="forwardButton"
					Click="forwardButton_Click"
					Grid.Row="0"
					Grid.Column="5"
					HorizontalAlignment="Center">
				<Button.ToolTip>
					<custom:PowerToolTip Header="Forward"
										 Error=""
										 MaxWidth="{StaticResource toolTipMaxWidth}"
										 ShortcutVisiblity="Visible"
										 Shortcut="Ctrl + Right Arrow">
						<custom:PowerToolTip.Description>
							<StackPanel>
								<TextBlock TextWrapping="WrapWithOverflow">
										Show the next image in the open images.
								</TextBlock>
							</StackPanel>
						</custom:PowerToolTip.Description>
					</custom:PowerToolTip>
				</Button.ToolTip>
				<Image Source="/ImageTagEditor;component/Images/forwardArrow.png" />
			</Button>


			<TextBlock x:Name="currentIndexTextBlock"
					   Grid.Row="1"
					   Grid.Column="1"
					   HorizontalAlignment="Center">
				<TextBlock.ToolTip>
					<custom:PowerToolTip Header="Current Image Index"
											 Error=""
											 MaxWidth="{StaticResource toolTipMaxWidth}">
						<custom:PowerToolTip.Description>
							<StackPanel>
								<TextBlock TextWrapping="WrapWithOverflow">
										The index of the currently showing image in the collection of opened images.
								</TextBlock>
							</StackPanel>
						</custom:PowerToolTip.Description>
					</custom:PowerToolTip>
				</TextBlock.ToolTip>
			</TextBlock>
			<TextBlock Grid.Row="1"
					   Grid.Column="3"
					   HorizontalAlignment="Center"> 
				of 
			</TextBlock>
			<TextBlock x:Name="imageCountTextBlock"
					   Grid.Row="1"
					   Grid.Column="5"
					   HorizontalAlignment="Center">
				<TextBlock.ToolTip>
					<custom:PowerToolTip Header="Open Image Count"
											 Error=""
											 MaxWidth="{StaticResource toolTipMaxWidth}">
						<custom:PowerToolTip.Description>
							<StackPanel>
								<TextBlock TextWrapping="WrapWithOverflow">
										The number of images currently opened.
								</TextBlock>
							</StackPanel>
						</custom:PowerToolTip.Description>
					</custom:PowerToolTip>
				</TextBlock.ToolTip>
			</TextBlock>
		</Grid>
		
		
	</Grid>
</Window>
